﻿// Decompiled with JetBrains decompiler
// Type: System.Web.Razor.ParserResults
// Assembly: System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
// MVID: 682513D6-F37E-48AC-9909-F3EE103CFF14
// Assembly location: D:\Project\Idea\无人机外网\uav\客户端工程\排查工具\bin\Release\System.Web.Razor.dll

using System.Collections.Generic;
using System.Web.Razor.Parser.SyntaxTree;

namespace System.Web.Razor
{
  /// <summary>This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Represents the results of parsing a Razor document.</summary>
  public class ParserResults
  {
    /// <summary>This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Initializes a new instance of the <see cref="T:System.Web.Razor.ParserResults" /> class.</summary>
    /// <param name="document">The root node in the document’s syntax tree.</param>
    /// <param name="parserErrors">The list of errors which occurred during parsing.</param>
    public ParserResults(Block document, IList<RazorError> parserErrors)
      : this(parserErrors == null || parserErrors.Count == 0, document, parserErrors)
    {
    }

    /// <summary>This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Initializes a new instance of the <see cref="T:System.Web.Razor.ParserResults" /> class.</summary>
    /// <param name="success">true if parsing was successful; otherwise, false.</param>
    /// <param name="document">The root node in the document’s syntax tree.</param>
    /// <param name="errors">The list of errors which occurred during parsing.</param>
    protected ParserResults(bool success, Block document, IList<RazorError> errors)
    {
      this.Success = success;
      this.Document = document;
      this.ParserErrors = errors ?? (IList<RazorError>) new List<RazorError>();
    }

    /// <summary>This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets or sets a value indicating whether parsing was successful.</summary>
    /// <returns>true if parsing was successful; otherwise, false.</returns>
    public bool Success { get; private set; }

    /// <summary>This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets or sets the root node in the document’s syntax tree.</summary>
    /// <returns>The root node in the document’s syntax tree.</returns>
    public Block Document { get; private set; }

    /// <summary>This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets or sets the list of errors which occurred during parsing.</summary>
    /// <returns>The list of errors which occurred during parsing.</returns>
    public IList<RazorError> ParserErrors { get; private set; }
  }
}
